﻿using System.Web.Mvc;
using KLS.PPDS.ApplicationService.Manager;
using KLS.PPDS.Utilities.BaseController;
using KLS.PPDS.Web.Models;

namespace KLS.PPDS.Web.Controllers.Publication
{
    /// <summary>
    /// Controller class for Storyboard
    /// </summary>
    public class StoryboardController : BaseController
    {
        //
        // GET: /Storyboard/
        /// <summary>
        /// 
        /// </summary>
        /// <param name="publicationId"></param>
        /// <param name="model"></param>
        /// <returns></returns>
        public ActionResult Index(StoryboardViewModel model,int publicationId)
        {
            var publication = PublicationManager.GetPublicationById(publicationId);

            if (publication!=null)
            {
                model.Publication = publication;
            }

            model.ArticleList = ArticleManager.GetArticleByPublicationId(publicationId);
            model.StandByArticleList = ArticleManager.GetAllStandByArticle(publicationId);

            return View(model);
        }

    }
}
